package com.kuang.scanner;

import java.util.Scanner;

public class Demo01 {
    public static void main(String[] args) {
        System.out.println("使用hasNext去接受");
        Scanner scanner = new Scanner(System.in);

        if(scanner.hasNext()){
            String str = scanner.next();
            System.out.println(str);
        }
       scanner.close();
    }
}
